import 'package:kkhousekeep/generated/json/base/json_field.dart';
import 'package:kkhousekeep/generated/json/order_result_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class OrderResultEntity {
	late int code;
	late OrderResultObj obj;
	late String msg;

	OrderResultEntity();

	factory OrderResultEntity.fromJson(Map<String, dynamic> json) => $OrderResultEntityFromJson(json);

	Map<String, dynamic> toJson() => $OrderResultEntityToJson(this);

	OrderResultEntity copyWith({int? code, OrderResultObj? obj, String? msg}) {
		return OrderResultEntity()
			..code= code ?? this.code
			..obj= obj ?? this.obj
			..msg= msg ?? this.msg;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class OrderResultObj {
	late String fatalType;
	late String standard;
	late String result;
	late String cause;
	late String propose;
	late String appraise;
	late List<String> pics;
	late double cost;
	late String assistants;

	OrderResultObj();

	factory OrderResultObj.fromJson(Map<String, dynamic> json) => $OrderResultObjFromJson(json);

	Map<String, dynamic> toJson() => $OrderResultObjToJson(this);

	OrderResultObj copyWith({String? fatalType, String? standard, String? result, String? cause, String? propose, String? appraise, List<String>? pics, double? cost, String? assistants}) {
		return OrderResultObj()
			..fatalType= fatalType ?? this.fatalType
			..standard= standard ?? this.standard
			..result= result ?? this.result
			..cause= cause ?? this.cause
			..propose= propose ?? this.propose
			..appraise= appraise ?? this.appraise
			..pics= pics ?? this.pics
			..cost= cost ?? this.cost
			..assistants= assistants ?? this.assistants;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}